/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@Entity
@Table(name = "sede")
@NamedQueries({
    @NamedQuery(name = "Sede.countSede", query="SELECT COUNT(s.id) FROM Sede s"),
    @NamedQuery(name = "Sede.findAll", query = "SELECT s FROM Sede s"),
    @NamedQuery(name = "Sede.findById", query = "SELECT s FROM Sede s WHERE s.id = :id"),
    @NamedQuery(name = "Sede.findByCitta", query = "SELECT s FROM Sede s WHERE s.citta = :citta"),
    @NamedQuery(name = "Sede.findByVia", query = "SELECT s FROM Sede s WHERE s.via = :via"),
    @NamedQuery(name = "Sede.findByEmail", query = "SELECT s FROM Sede s WHERE s.email = :email"),
    @NamedQuery(name = "Sede.findByCap", query = "SELECT s FROM Sede s WHERE s.cap = :cap"),
    @NamedQuery(name = "Sede.findByTelefono", query = "SELECT s FROM Sede s WHERE s.telefono = :telefono"),
    @NamedQuery(name = "Sede.findByProvincia", query = "SELECT s FROM Sede s WHERE s.provincia = :provincia"),
    @NamedQuery(name = "Sede.findByResponsabileid", query = "SELECT s FROM Sede s WHERE s.responsabileid = :responsabileid")})
public class Sede implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "citta")
    private String citta;
    @Column(name = "via")
    private String via;
    @Column(name = "email")
    private String email;
    @Column(name = "cap")
    private Integer cap;
    @Column(name = "telefono")
    private Integer telefono;
    @Column(name = "provincia")
    private String provincia;
    @Column(name = "responsabileid")
    private Integer responsabileid;

    public Sede() {
    }

    public Sede(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCitta() {
        return citta;
    }

    public void setCitta(String citta) {
        this.citta = citta;
    }

    public String getVia() {
        return via;
    }

    public void setVia(String via) {
        this.via = via;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Integer getCap() {
        return cap;
    }

    public void setCap(Integer cap) {
        this.cap = cap;
    }

    public Integer getTelefono() {
        return telefono;
    }

    public void setTelefono(Integer telefono) {
        this.telefono = telefono;
    }

    public String getProvincia() {
        return provincia;
    }

    public void setProvincia(String provincia) {
        this.provincia = provincia;
    }

    public Integer getResponsabileid() {
        return responsabileid;
    }

    public void setResponsabileid(Integer responsabileid) {
        this.responsabileid = responsabileid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sede)) {
            return false;
        }
        Sede other = (Sede) object;
        return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "jpa.Sede[id=" + id + "]";
    }

}
